package com.xiaoshuidi.cloud.module.rooms.controller.admin.reservation.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author Feng
 * @date 2023/5/19
 */
@Data
@Schema(description = "创建预定单请求对象")
public class ReserveCreateReq {


    /**
     * 关联的房间
     */
    @NotNull(message = "请选择一个房源信息")
    @Schema(description = "关联的房间")
    private Long roomHouseId;

    /**
     * 客户类型 1个人客户 2企业客户
     */
    @NotNull(message = "客户类型不可为空")
    @Schema(description = "客户类型 1个人客户 2企业客户")
    private String customType;
    /**
     * 公司ID
     */
    @Schema(description = "公司ID")
    private Long companyId;

    /**
     * 公司名称
     */
    @Schema(description = "公司名称")
    private String companyName;

    /**
     * 公司法人
     */
    @Schema(description = "公司法人")
    private String companyLegalPerson;

    /**
     * 公司联系电话
     */
    @Schema(description = "公司联系电话")
    private String companyTel;

    /**
     * 公司营业执照号
     */
    @Schema(description = "公司营业执照号")
    private String companyBln;

    /**
     * 预订人姓名
     */
    @NotNull(message = "预定人姓名")
    @Schema(description = "预订人姓名")
    private String booker;

    /**
     * 预订人手机号
     */
    @NotNull(message = "预定人手机号")
    @Schema(description = "预定人手机号")
    private String bookerPhone;

    /**
     * 预订人证件类型
     */
    @Schema(description = "预订人证件类型")
    private String cardType;

    /**
     * 证件号码
     */
    @Schema(description = "证件号码")
    private String cardNo;

    /**
     * 预计入住日期
     */
    @Schema(description = "预计入住日期")
    private LocalDate checkInDate;

    /**
     * 预计退房日期
     */
    @NotNull(message = "预计退房日期不能为空")
    @Schema(description = "预计退房日期")
    private LocalDate checkOutDate;

    /**
     * 定金支付期限
     */
    @NotNull(message = "定金支付期限不能为空")
    @Schema(description = "定金支付期限")
    private LocalDateTime depositPaymentTerm;

    /**
     * 预定失效日期
     */
    @NotNull(message = "预定失效日期不能为空")
    @Schema(description = "预定失效日期")
    private LocalDateTime expirationDate;

    /**
     * 预定定金
     */
    @NotNull(message = "预定定金不能为空")
    @Min(value = 0, message = "预定定金不能小于0")
    @Digits(integer = 19, fraction = 2, message = "预定定金最大两位小数")
    @Schema(description = "预定定金")
    private BigDecimal deposit;

    /**
     * 销售人员ID
     */
    @Schema(description = "销售人员ID")
    private Long salespersonId;

    /**
     * 冗余-销售人员名称
     */
    @Schema(description = "冗余-销售人员名称")
    private String salesperson;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 压几  |  付款周期
     */
    @Schema(description = "压几|付款周期")
    private Integer payMethodY;

    /**
     * 付几 | 付款周期
     */
    @Schema(description = "付几|付款周期")
    private Integer payMethodF;

    /**
     * 预计租期
     */
    @Schema(description = "预计租期")
    private Integer expectLeaseTerm;
}
